package com.zhengke.controller.kcgl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhengke.common.object.Result;
import com.zhengke.service.InventoryManageService;

@Controller
@RequestMapping("inventory")
public class InventoryController {

	@Autowired
	private InventoryManageService service;
	
	/**
	 * 去往listTvUserCredit页面
	 * @return
	 */
	@RequestMapping("toInventory")
	public String toQueryTvUserCredit() {
		return "inventory/inventoryList";
	}
	
	
	@RequestMapping(value="findInventory",method=RequestMethod.POST)
	@ResponseBody
	public Result findInventory(String goods_name,Integer is_normal,int limit,int page) {
		Result result = new Result();
		try {
		result = service.findInventory(goods_name, is_normal, limit, page);
		} catch (Exception e) {
			
			e.printStackTrace();
		}
		return result;
	}

	
	
}
